package com.shundr.shipper.cargo.model;

import java.io.Serializable;

import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;

@DatabaseTable(tableName = "CargoInfo")
public class CargoInfo implements Serializable {
	
	public static class CargoLocalType {
		/**
		 * 未读消息
		 */
		public static final int unread = 0;
		/**
		 * 历史消息
		 */
		public static final int history = 1;

		/**
		 * 已经抢过单了
		 */
		public static final int hasOrder = 2;

		/**
		 * 已经抢过单了 并且失败了
		 */
		public static final int hasOrderFail = 3;
	}

	/**
	 * serialVersionUID:TODO
	 * 
	 * @since 1.0.0
	 */

	private static final long serialVersionUID = 1L;
	/**
	 * 数据类型 详见 CargoLocalType类的说明
	 */
	@DatabaseField
	private Integer localType;
	/**
	 * 本地数据记录主键
	 */
	@DatabaseField(generatedId = true)
	private Integer id;
	/**
	 * 本地用户id，即表示这个数据记录属于哪个登录用户的
	 */
	@DatabaseField
	private Integer localUserId;

	public Integer getLocalType() {
		return localType;
	}

	public void setLocalType(int localType) {
		this.localType = localType;
	}

	public Integer getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	/**
	* 
	*/
	@DatabaseField
	public Integer cargoId;

	/**
	 * 用户id，user_info外键
	 */
	@DatabaseField
	public Integer userId;

	/**
	 * 货物种类、名称
	 */
	@DatabaseField
	public String cargoCategory;

	/**
	 * 货物数量
	 */
	@DatabaseField
	public String cargoAmount;

	/**
	 * 货物单价低，每立方，每吨，每千克，每票
	 */
	@DatabaseField
	public String cargoUnitPrice;

	/**
	 * 货物单位名称 吨，车、方，千克，件、台、公斤、个、箱
	 */
	@DatabaseField
	public String cargoUnitName;

	/**
	 * 货物出发地代码
	 */
	@DatabaseField
	public Integer cargoSrcCode;

	/**
	 * 货物出发地
	 */
	@DatabaseField
	public String cargoSrcPlace;

	/**
	 * 货物出发地详细地址
	 */
	@DatabaseField
	public String cargoSrcPlaceDetail;

	/**
	 * 货物目的地代码
	 */
	@DatabaseField
	public Integer cargoDstCode;

	/**
	 * 货物目的地
	 */
	@DatabaseField
	public String cargoDstPlace;

	/**
	 * 货物目的地详细地址
	 */
	@DatabaseField
	public String cargoDstPlaceDetail;

	/**
	* 
	*/
	@DatabaseField
	public Integer cargoTruckTypeCode;

	/**
	 * 需车类型
	 */
	@DatabaseField
	public String cargoTruckType;

	/**
	 * 需车最少数量
	 */
	@DatabaseField
	public Integer cargoTruckNum;

	/**
	 * 需车最小长度
	 */
	@DatabaseField
	public String cargoTruckLength;

	/**
	 * 组合货物描述
	 */
	@DatabaseField
	public String cargoDescription;

	/**
	 * 常用短语备注
	 */
	@DatabaseField
	public String cargoRemarks;

	/**
	 * 货物最迟运输时间，也是有效截止日期
	 */
	@DatabaseField
	public String cargoExpiryTime;

	/**
	 * 货源厂家（公司）或物流公司的联系人
	 */
	@DatabaseField
	public String cargoContactPerson;

	/**
	 * 货源厂家（公司）或物流公司的名称
	 */
	@DatabaseField
	public String cargoCompanyName;

	/**
	 * 货源厂家（公司）或物流公司的电话1
	 */
	@DatabaseField
	public String cargoCompanyPhone1;

	/**
	 * 货源厂家（公司）或物流公司的电话2
	 */
	@DatabaseField
	public String cargoCompanyPhone2;

	/**
	 * 货源厂家（公司）或物流公司的电话3
	 */
	@DatabaseField
	public String cargoCompanyPhone3;

	/**
	 * 货源厂家（公司）或物流公司的电话4
	 */
	@DatabaseField
	public String cargoCompanyPhone4;

	/**
	 * -1: 货主删除 1：等待成交 2：已经成交
	 */
	@DatabaseField
	public Integer cargoStatus;

	/**
	* 
	*/
	@DatabaseField
	public Integer cargoSource;

	/**
	 * 货物插入时间
	 */
	@DatabaseField
	public String cargoInsertTime;

	/**
	 * 推荐时循环的次数
	 */
	@DatabaseField
	public Integer recommendLoop;

	/**
	 * 推荐次数，默认为0不推荐，其他的为被推荐的次数
	 */
	@DatabaseField
	public Integer recommendCount;

	/**
	 * 上次推荐时间
	 */
	@DatabaseField
	public String lastRecommendTime;
	
	/**
	 * 重发时间
	 */
	@DatabaseField
	public String cargoResendTime;
	
	/**
	 * 抢单数目
	 */
	@DatabaseField
	public Integer grabNum;
	
	/**
	 * 是否已收藏
	 */
	public boolean favorited;

	public CargoInfo() {
	}

	public Integer getCargoId() {
		return cargoId;
	}

	public void setCargoId(Integer cargoId) {
		this.cargoId = cargoId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public String getCargoCategory() {
		return cargoCategory;
	}

	public void setCargoCategory(String cargoCategory) {
		this.cargoCategory = cargoCategory;
	}

	public String getCargoUnitName() {
		return cargoUnitName;
	}

	public void setCargoUnitName(String cargoUnitName) {
		this.cargoUnitName = cargoUnitName;
	}

	public Integer getCargoSrcCode() {
		return cargoSrcCode;
	}

	public void setCargoSrcCode(Integer cargoSrcCode) {
		this.cargoSrcCode = cargoSrcCode;
	}

	public String getCargoSrcPlace() {
		return cargoSrcPlace;
	}

	public void setCargoSrcPlace(String cargoSrcPlace) {
		this.cargoSrcPlace = cargoSrcPlace;
	}

	public String getCargoSrcPlaceDetail() {
		return cargoSrcPlaceDetail;
	}

	public void setCargoSrcPlaceDetail(String cargoSrcPlaceDetail) {
		this.cargoSrcPlaceDetail = cargoSrcPlaceDetail;
	}

	public Integer getCargoDstCode() {
		return cargoDstCode;
	}

	public void setCargoDstCode(Integer cargoDstCode) {
		this.cargoDstCode = cargoDstCode;
	}

	public String getCargoDstPlace() {
		return cargoDstPlace;
	}

	public void setCargoDstPlace(String cargoDstPlace) {
		this.cargoDstPlace = cargoDstPlace;
	}

	public String getCargoDstPlaceDetail() {
		return cargoDstPlaceDetail;
	}

	public void setCargoDstPlaceDetail(String cargoDstPlaceDetail) {
		this.cargoDstPlaceDetail = cargoDstPlaceDetail;
	}

	public Integer getCargoTruckTypeCode() {
		return cargoTruckTypeCode;
	}

	public void setCargoTruckTypeCode(Integer cargoTruckTypeCode) {
		this.cargoTruckTypeCode = cargoTruckTypeCode;
	}

	public String getCargoTruckType() {
		return cargoTruckType;
	}

	public void setCargoTruckType(String cargoTruckType) {
		this.cargoTruckType = cargoTruckType;
	}

	public Integer getCargoTruckNum() {
		return cargoTruckNum;
	}

	public void setCargoTruckNum(Integer cargoTruckNum) {
		this.cargoTruckNum = cargoTruckNum;
	}

	public String getCargoDescription() {
		return cargoDescription;
	}

	public void setCargoDescription(String cargoDescription) {
		this.cargoDescription = cargoDescription;
	}

	public String getCargoRemarks() {
		return cargoRemarks;
	}

	public void setCargoRemarks(String cargoRemarks) {
		this.cargoRemarks = cargoRemarks;
	}

	public String getCargoExpiryTime() {
		return cargoExpiryTime;
	}

	public void setCargoExpiryTime(String cargoExpiryTime) {
		this.cargoExpiryTime = cargoExpiryTime;
	}

	public String getCargoContactPerson() {
		return cargoContactPerson;
	}

	public void setCargoContactPerson(String cargoContactPerson) {
		this.cargoContactPerson = cargoContactPerson;
	}

	public String getCargoCompanyName() {
		return cargoCompanyName;
	}

	public void setCargoCompanyName(String cargoCompanyName) {
		this.cargoCompanyName = cargoCompanyName;
	}

	public String getCargoCompanyPhone1() {
		return cargoCompanyPhone1;
	}

	public void setCargoCompanyPhone1(String cargoCompanyPhone1) {
		this.cargoCompanyPhone1 = cargoCompanyPhone1;
	}

	public String getCargoCompanyPhone2() {
		return cargoCompanyPhone2;
	}

	public void setCargoCompanyPhone2(String cargoCompanyPhone2) {
		this.cargoCompanyPhone2 = cargoCompanyPhone2;
	}

	public String getCargoCompanyPhone3() {
		return cargoCompanyPhone3;
	}

	public void setCargoCompanyPhone3(String cargoCompanyPhone3) {
		this.cargoCompanyPhone3 = cargoCompanyPhone3;
	}

	public String getCargoCompanyPhone4() {
		return cargoCompanyPhone4;
	}

	public void setCargoCompanyPhone4(String cargoCompanyPhone4) {
		this.cargoCompanyPhone4 = cargoCompanyPhone4;
	}

	public Integer getCargoStatus() {
		return cargoStatus;
	}

	public void setCargoStatus(Integer cargoStatus) {
		this.cargoStatus = cargoStatus;
	}

	public Integer getCargoSource() {
		return cargoSource;
	}

	public void setCargoSource(Integer cargoSource) {
		this.cargoSource = cargoSource;
	}

	public String getCargoInsertTime() {
		return cargoInsertTime;
	}

	public void setCargoInsertTime(String cargoInsertTime) {
		this.cargoInsertTime = cargoInsertTime;
	}

	public Integer getRecommendLoop() {
		return recommendLoop;
	}

	public void setRecommendLoop(Integer recommendLoop) {
		this.recommendLoop = recommendLoop;
	}

	public Integer getRecommendCount() {
		return recommendCount;
	}

	public void setRecommendCount(Integer recommendCount) {
		this.recommendCount = recommendCount;
	}

	public String getLastRecommendTime() {
		return lastRecommendTime;
	}

	public void setLastRecommendTime(String lastRecommendTime) {
		this.lastRecommendTime = lastRecommendTime;
	}

	public Integer getGrabNum() {
		return grabNum;
	}

	public void setGrabNum(Integer grabNum) {
		this.grabNum = grabNum;
	}

	public Integer getLocalUserId() {
		return localUserId;
	}

	public void setLocalUserId(Integer localUserId) {
		this.localUserId = localUserId;
	}

	public boolean isFavorited() {
		return favorited;
	}

	public void setFavorited(boolean favorited) {
		this.favorited = favorited;
	}

	public String getCargoResendTime() {
		return cargoResendTime;
	}

	public void setCargoResendTime(String cargoResendTime) {
		this.cargoResendTime = cargoResendTime;
	}

	public void setLocalType(Integer localType) {
		this.localType = localType;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	public String getCargoAmount() {
		return cargoAmount;
	}

	public void setCargoAmount(String cargoAmount) {
		this.cargoAmount = cargoAmount;
	}

	public String getCargoUnitPrice() {
		return cargoUnitPrice;
	}

	public void setCargoUnitPrice(String cargoUnitPrice) {
		this.cargoUnitPrice = cargoUnitPrice;
	}

	public String getCargoTruckLength() {
		return cargoTruckLength;
	}

	public void setCargoTruckLength(String cargoTruckLength) {
		this.cargoTruckLength = cargoTruckLength;
	}
	
	

}
